/*
 * Robot3D.java -
 * Copyright (c) 2005 Carmine Lia
 * e-mail:      carmine.lia@libero.it
 * web-address: http://www.intermedia.sa.it/lia

 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
package javax.robotics.engine.robots;



import javax.Robotics.vecmath.RMatrix4d;
import javax.media.j3d.BranchGroup;
import javax.robotics.vecmath.RVector;
/**
 * <p>
 * This is an interface for graphic 3D, kinematics and dynamics model of different open chain robot manipulators.
 * </p>
 * <b>Example of use</b>
 * <p> 
 * The example <a href="doc-files/Demo3D.txt">Demo3D.java</a> shows how to use Robot3D class in your java based
 * application.
 * @author <a href="http://www.intermedia.sa.it/lia/">Carmine Lia</a>
 * @since 1.0.3
 * @version 16/11/2005
 */
public interface Robot3D extends Robot
{
    boolean PRISMATIC = true;
    boolean REVOLUTE = false;
    
    /**
     * Gets the type of joint REVOLUTE or PRISMATIC 
     * @param i the joint
     * @return true if prismatic false if revolute
     */
    boolean isJointPrismatic( int i);
    
    /**
     * Gets the immobile flag. 
     * @param i the joint
     * @return the immobile flag.
     */
    boolean isJointImmobile( int i);
    /**
     * Gets the model 3D of robot manipulator.
     * @return the Java 3D model.
     */
    BranchGroup getModel3D();
    
    /**
     * Gets the 4x4 transformation matrix of i-th joint.
     * @param i the i-th joint;
     * @return the homogeneous matrix.
     */
    RMatrix4d getTransformMatrix( int i);
    
    /**
     * Sets the position of the joints only of 3D model.
     * @param q the new positions.
     */
    void setQ3DOnly( RVector q);
    /**
     * Sets the position of the joints only of 3D model.
     * @param q the new positions.
     */
    void setQ3DOnly( double[] q);
    /**
     * Sets the position of the i-th joint only of 3D model.
     * @param q the new position.
     * @param i the joint.
     */
    void setQ3DOnly( double q,  int i);
    /**
     * Sets the position of the joints.
     * @param q the new positions.
     */
    void setQ3D( RVector q);
    /**
     * Sets the position of the joints.
     * @param q the new positions.
     */
    void setQ3D( double[] q);
    /**
     * Sets the position of the i-th joint.
     * @param q the new position.
     * @param i the joint.
     */
    void setQ3D( double q,  int i);
   

}
